<template>
  <el-table
    :data="tableData"
    style="width: 100%"
    :default-sort = "{prop: 'date', order: 'descending'}"
    >

    <el-table-column v-for="(ele,index) in tableCloumn" :key="index"
      :prop="ele.propKey"
      :label="ele.labelKey"
      sortable
      :width="ele.widthKey">
    </el-table-column>

    <el-table-column label="操作">
      <template slot-scope="scope">
        <slot :obj="scope.row"></slot>
      </template>
    </el-table-column>

  </el-table>
</template>

<script>
  export default {
    props:{
      tableData: Array,
      tableCloumn: Array
    }
  }
</script>

<style scoped>
.el-table{
  height: 610px;
}
table tr{
  line-height: 30px;
}
</style>
